<%-- 
    Document   : activationcode
    Created on : 2010-3-5, 16:03:51
    Author     : fengbj
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http ://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="xxxxxxxxxxxxxxxxxxx" />
<meta name="keywords" content="xxxxxxxxxxxxxxxx" />
<meta name="robots" content="all" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
<title>获取激活码</title>
</head>
<body>
<div class="pays">
  <!--页头-->
  <jsp:include page="common/head.jsp"/>
  <jsp:include page="common/navBar.jsp"/>
  <!--主盒子-->
  <div class="paysMain">
    <jsp:include page="common/mainleft.jsp"/>
    <div class="mainright">
      <div class="tipZone">
        <div class="leftTopimg"></div>
        <div class="tipZoneBkleft"></div>
        <div class="tipZoneBkright"></div>
        <div class="steps">
          <div class="steps1"></div>
          <div class="steps2"></div>
        </div>
        <div class="tipregion"> <img src="images/tipsIcon.gif"/>
          <p>您需要输入设备码和序列号来获取激活码。<a href="">什么是激活码？</a><br/>
            <span class="bluetip">友情提示：请妥善保管您的序列号，通过序列号，可以随时在本页面获取或查询您的激活码。</span></p>
        </div>
      </div>
      <div class="adpaysMain3"> <img src="images/titleBk3.gif" />
        <div class="getAct">
          <form id="form1" name="form1" method="post" action="/getActivationCodeProcess.action">
            <table>
              <tr>
                <th>输入设备码</th>
                <td><input class="textfield2" type="text"  id="deviceId" name="deviceId" value="${deviceId}${device.deviceId}" maxlength="16"/>
                  <a href="">什么是设备码？</a></td>
              </tr>
              <tr>
                <td></td>
                <td><p class="saylistnomal" id="deviceIdInfo">如果输入错误，您的导航仪将无法正常使用</p></td>
              </tr>
              <tr>
                <th>再次输入设备码</th>
                <td><input class="textfield2" type="text"  id="deviceIdTwo" name="deviceIdTwo" value="${deviceIdTwo}${device.deviceId}" maxlength="16"/></td>
              </tr>
              <tr>
                <td></td>
                <td><p id="deviceIdTwoInfo" class="saylistnomal"></p></td>
              </tr>
              <tr>
                <th>输入您的序列号</th>
                <td><input class="textfield3" type="text"  id="serial1" name="serial" maxlength="4"/>
                  <input class="textfield3" type="text"  id="serial2" name="serial" maxlength="4"/>
                  <input class="textfield3" type="text"  id="serial3" name="serial" maxlength="4"/>
                  <input class="textfield3" type="text"  id="serial4" name="serial" maxlength="4"/>
                  <a href="">什么是序列号？</a></td>
              </tr>
              <tr>
                <td></td>
                <td><div class="saylistnomal" id="serialInfo">如果您没有或丢失了序列号时，请</div>
                  <span><a href="/buyIndex.action">点击这里购买新的服务</a></span></td>
              </tr>
            </table>
            <input type="submit" value="" class="btnGetAct" id="submit"/>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<jsp:include page="common/foot.jsp"/>
<jsp:include page="common/js.jsp"/>
</body>
<script>
        $(document).ready(function(){
                    <!-- 登录用户的serial -->
                    <s:if test="device != null">
                        var serialString = "${device.activation}"
                    </s:if>
                    <s:if test="hasFieldErrors()">
                        var s=[],temp = null;
                        <s:iterator value="fieldErrors" id="c" status="s">
                        s[${s.index}] = "${c}";
                        </s:iterator>

                        for(i = 0 ; i < s.length ; i++){
                            temp = s[i];
                            if(temp != null && temp != ""){
                                cL = temp.replace(/^(\w+).*\[.*\]$/gi , "$1");
                                cContent = temp.replace(/^\w+.*\[(.*)\]$/gi , "$1");
                                if(cL != null && cL != "")
                                    mapbar.pay.activationcode.showError(cL , cContent);
                            }
                            temp = null;
                        }
                    </s:if>
                     $("#deviceId").keyup(mapbar.pay.activationcode.deviceIdCheck).blur(mapbar.pay.activationcode.deviceIdCheck);
                     $("#deviceIdTwo").keyup(mapbar.pay.activationcode.deviceIdTwoCheck).blur(mapbar.pay.activationcode.deviceIdTwoCheck);
                     $("input[name='serial']").keyup(mapbar.pay.activationcode.move).blur(mapbar.pay.activationcode.serialCheck);
                     $("#submit").click(function(){return mapbar.pay.activationcode.check();}).focus(function(){this.blur();});

                 });
    </script>
</html>
